#!/bin/bash
# SPDX-License-Identifier: MulanPSL-2.0+
# Copyright (c) 2024 Huawei Technologies Co., Ltd. All rights reserved.

. ../defconfig.sh

docker_skip_rebuild "bisect"

load_cci_defaults

if [ ! -d compass-ci ]; then
	git clone https://gitee.com/openeuler/compass-ci.git
fi
if [ ! -d lkp-tests ]; then
	git clone https://gitee.com/compass-ci/lkp-tests.git
fi

if [ $? -ne 0 ]; then
        echo "Failed to clone lkp-tests, copying SRC directory instead..."
        cp -r "$LKP_SRC" lkp-tests
fi

docker build -t bisect .

push_image bisect:latest

